package javacompiler.syntax;

public class IdGenerator {

	private long count;
	private static IdGenerator generator;
	
	private IdGenerator() {
		count = 0;
	}
	
	public static IdGenerator getInstance() {
		if (generator == null) {
			generator = new IdGenerator();
		}
		return generator;
	}
	
	public static void reset() {
		generator = null;
	}
	
	public long generate() {
	/*	long id = count;
		count++;
		return id;
	*/
		return count++;
	}
}
